package bank.model.vo;


/**
 * 
 * @author k.rudy
 *
 */
public class Report extends Document{
    public void saveToFile() {}
	
	public Report(Employee employee) {
    	super(employee);
    }
    
    protected void generateLines() {
    	addLine(String.format("The report on the work of %s\n", getEmployee().toString()));
    	addLine(String.format("Generated on %s\n", getCreationDate().toString()));
    	addLine(String.format("\nThe following payments were performed by the employee:\n\n"));
    	for (Payment payment: getEmployee().getPayments()) {
    		payment.generateLines();
    		for (String line: payment.getLines()) {
    			addLine(line);
    		}
    		addLine("\n");
    	}
    }
}
